<template>
    <div>
        我是首页
        <div>
            <button @click="toPage('/home/two')">组件2</button>
            <button @click="toPage('/home/three')">组件3</button>
        </div>
        <router-view></router-view>
    </div>
</template>

<script>
export default {
    data() {
        return {};
    },
    mounted() {},
    methods: {
        toPage(val) {
            this.$router.push(val);
        }
    }
};
</script>

<style></style>
